package com.etc.my.dao;

import com.etc.my.dto.CollectionAndCarMessageDto;
import com.etc.my.dto.CollectionDto;
import com.etc.my.dto.CountDto;

import java.util.List;

public interface MyCollectionDao {


    List<CollectionAndCarMessageDto> qyeryCollectionByUserIdOfPage(Integer userId,Integer page ,Integer size);

    CountDto queryCollectionCountByUserId(Integer userId);

    /**
     * 取消收藏
     * @param collection_id 收藏id
     * @return true/false
     */
    boolean deleteCollectionById(Integer collection_id);

    /**
     * 添加收藏
     * @param user_id
     * @param car_id
     * @return
     */
    boolean insertCollection(Integer user_id,String car_id);

    /**
     *查询用户是否已经收藏改车辆
     * @param user_id
     * @param car_id
     * @return
     */
    CollectionAndCarMessageDto isCollection(Integer user_id,String car_id);

    /**
     * 根据车辆id和用户id取消收藏
     * @param user_id 用户ID
     * @param car_id 车辆id
     * @return true/false
     */
    boolean cancelCollectionByCarAndUserId(Integer user_id,String car_id);
}
